import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        SlideCollapse: false,
        token: '',
        cookie: '',
        oid: '',
        userInfo: {
            token: null,
            username: '游客',
            avatarURL: 'https://disk.xiaotao2333.top:344/api/user/avatar/undefined'
        },
        cashePath: '',
        downloadPath: ''
    },
    mutations: {
        setDownloadPath(state, downloadPath) {
            state.downloadPath = downloadPath
        },
        setCashePath(state, cashePath) {
            state.cashePath = cashePath
        },
        setSlideCollapse(state, SlideCollapse) {
            state.SlideCollapse = SlideCollapse
        },
        setToken(state, token) {
            state.token = token
        },
        setCookie(state, cookie) {
            state.cookie = cookie
        },
        setOid(state, oid) {
            state.oid = oid
        },
        setUserInfo(state, userInfo) {
            state.userInfo = userInfo
        }
    },
    actions: {

    },
    modules: {
    }
})
